#include<bits/stdc++.h>

using namespace std;
struct Student {
    int num;
    char name[20];
    char sex;
    int age;
} s[20];
int n;//结构体数组实际大小
int main() {
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> s[i].num >> s[i].name >> s[i].sex >> s[i].age;
    }
    for (int i = 0; i < n; i++) {
        printf("%d %s %c %d\n", s[i].num, s[i].name, s[i].sex, s[i].age);
    }

    return 0;
}